<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <title>Document</title>
</head>

<body>
    <script type="text/javascript" src="../lib/jquery.js"></script>
    <script>
        function getVoice(callback) {
            $.get(
                "http://www.liulongbin.top:3006/api/robot", {
                    spoken: say,
                },
                function(res) {
                    callback(res.data.info.text);
                }
            );
        }

        function voice(callback, msg) {
            $.get(
                "http://www.liulongbin.top:3006/api/synthesize", {
                    text: msg,
                },
                function(res) {
                    callback(res);
                }
            );
        }
        getVoice(function(msg) {
            voice(function(voice) {
                console.log(voice);
            });
        });
    </script>
</body>

</html>